#ifndef TYPE_NAME_H
#define TYPE_NAME_H

#include <stdint.h>
#include <stddef.h>

typedef unsigned char		  uchar;
typedef unsigned short		  ushort;
typedef unsigned int		  uint;
typedef unsigned long		  ulong;
typedef long long			  llong;
typedef unsigned long long	  ullong;

typedef uint8_t	  	   u8;
typedef uint16_t	   u16;
typedef uint32_t	   u32;
typedef uint64_t	   u64;
typedef float		   f4;
typedef double		   f8;
typedef long double	   f12;

typedef int8_t	  	   mint8;
typedef int16_t	       mint16;
typedef int32_t	       mint32;
typedef int64_t	       mint64;
typedef float		   mf4;
typedef double		   mf8;
typedef long double	   mf12;

typedef uint8_t	  	   muint8;
typedef uint16_t       muint16;
typedef uint32_t       muint32;
typedef uint64_t       muint64;

typedef size_t   msize;

#if defined _WIN64 || defined __x86_64__ || defined __arm64__ || defined __aarch64__
typedef uint64_t AddressBitsWide;
#else
typedef uint32_t AddressBitsWide;
#endif // 32bit & 64bit

typedef uint64_t  timestamp;


/*------------------------------------------------------------*/

#ifdef __cplusplus

#if __cplusplus >= 201103L

#define NONE  nullptr
#define NOTHROW  noexcept
#define NOTHROW_V(v)  noexcept(v)
#define CONSTEXPR  constexpr

#else //cpp11

#define NOTHROW  throw()
#define NOTHROW_V(v)  throw(v)
#define CONSTEXPR

const class nullptr_t
{
public:
    template<class T>
    inline operator T*() const
        { return 0; }

    template<class C, class T>
    inline operator T C::*() const
        { return 0; }

private:
void operator&() const;
}NONE = {};

#endif //cpp11

#else //cpp

#ifndef NULL
#define NULL  (void*)(0)
#endif //NULL

#endif //cpp


#endif //TYPE_NAME_H
